This repository has been archived by the owner on Feb 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
hsm: add possibility to update HSM firmware from middleware #314
Open
Tomasvrba
wants to merge
2
commits into
BitBoxSwiss:master
Choose a base branch
from
Tomasvrba:update-hsm-firmware
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Stadicus We will also need to set the |
Stadicus
approved these changes
Dec 12, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK c42bbc0
benma
suggested changes
Dec 17, 2019
This commit: - Adds the `AvailableHSMVersion` Redis key: `hsm:firmware:version` - Adds the `HSMUpdateAvailable()` method to the middleware which compares the version of the running HSM firmware and the AvailableHSMVersion Redis key - If a new version is available, the `main()` function executes the update via the hsm immediately after the middleware is started - The signed firmware file is assumed to be in `/opt/shift/hsm/firmware-bitboxbase.signed.bin` which is the default value of the `hsmFirmwareFile` flag - Together with the `updateHSMFirmware`, this can be used to force flash firmware from a custom location - If an update is successful, reboot back into the firmware via the middleware so that the middleware has access to the new `hsmFirmware`
Tomasvrba
force-pushed
the
update-hsm-firmware
branch
2 times, most recently
from
December 19, 2019 11:11
dc4eefa
to
cd0fcd3
Compare
Tomasvrba
force-pushed
the
update-hsm-firmware
branch
from
December 19, 2019 11:33
7fd11df
to
f7311a4
Compare
@benma Could you please take another quick look over my changes which address your review? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit:
AvailableHSMVersion
Redis key:hsm:firmware:version
HSMUpdateAvailable()
method to the middleware whichcompares the version of the running HSM firmware and the
AvailableHSMVersion Redis key
main()
function executes theupdate via the hsm immediately after the middleware is started
/opt/shift/hsm/firmware-bitboxbase.signed.bin
which is the defaultvalue of the
hsmFirmwareFile
flagupdateHSMFirmware
, this can be used to force flashfirmware from a custom location
middleware so that the middleware has access to the new
hsmFirmware